home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Development Kits / MPW Related / DTS MPW Goodies / CompareLastRevision < prev    next >
Encoding:
Text File  |  1990-09-14  |  1.1 KB  |  50 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        CompareLastRevision
  3. #
  4. #    Contains:    script to compare a file with the last revision of it
  5. #
  6. #    Usage:        CompareLastRevision file…
  7. #
  8. #                CompareLastRevision runs a compare command with the last revision
  9. #                of a file checked out for modification.
  10. #
  11. #    Written by:    Darin Adler and scott douglass
  12. #
  13. #    Copyright:    © 1988, 1989 by Apple Computer, Inc., all rights reserved.
  14. #
  15. #    Change History:
  16. #
  17. #        11/9/89        dba        twiddled a bit; CompareRevisions is better
  18. #        11/8/89        dba        change != to ≠
  19. #
  20. #    To Do:
  21. #
  22.  
  23. Set Exit 0
  24.  
  25. For File In {"Parameters"}
  26.     If "{File}" !~ /:*([¬:]+:*)*([¬:]+)®1/
  27.         Echo "### {0} - “{File}”: bad file name" > Dev:StdErr
  28.         Continue
  29.     End
  30.     Set Short "{®1}"
  31.  
  32.     Set Info "`ProjectInfo "{File}"`"
  33.     If "{Info}" !~ /≈Project: ([¬:]+∫)®1     Checked out: ≈/
  34.         Echo "### {0} - “{File}”: not part of project" > Dev:StdErr
  35.         Continue
  36.     End
  37.     Set Project "{®1}"
  38.  
  39.     CheckOut -d "{Boot}" -project "{Project}" "{Short}"
  40.     Set CheckOutStatus {Status}
  41.     If {CheckOutStatus}
  42.         Echo "### {0} - unable to check out “{File}”" > Dev:StdErr
  43.         Exit {CheckOutStatus}
  44.     End
  45.  
  46.     Compare -n -t -x "{Boot}{Short}" "{File}"
  47.  
  48.     Delete -i "{Boot}{Short}"
  49. End
  50.